let baseURL = 'http://www.itcbc.com:8080'
$.ajaxPrefilter(function (option) {

    option.url = baseURL + option.url
    option.complete = function (xhr) {

        let res = xhr.responseJSON
        if (res.status === 1) {
            layer.msg(res.message, {
                icon: 5
            })
            if (res.message === '身份认证失败') {
                localStorage.removeItem('token')
                window.parent.location.href = '../login.html'
            }
        }
    }
    option.headers = {
        Authorization: localStorage.getItem('token')
    }

})